# -*- coding: utf-8 -*-
def my_write():
    #创建打开
    file = open('a.txt','w',encoding='utf-8')
    file.write('伟大的中国梦')
    file.close()#关闭

def my_read():
    #读取
    file=open('a.txt','r',encoding='utf-8')
    s=file.read()
    print(type(s),s)
    file.close()

def my_write_list(file,lst):
    #打开
    f=open(file,'a',encoding='utf-8')
    f.writelines(lst)
    f.close()#关闭

if __name__=="__main__":
    # my_read()#调用
    lst = ['姓名\t','年龄\t','成绩\n','张三\t','30\t','98']
    my_write_list('c.txt',lst)